package com.spc.car.web.controller.std;


import com.spc.car.core.framework.web.domain.AjaxResult;
import com.spc.car.data.service.std.StdGbProfessionalTechnicalPositionService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;

import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.constraints.Pattern;

/**
 * <p>
 * 专业技术职务代码
 GB/T 8561-2001 前端控制器
 * </p>
 *
 * @author 
 * @since 2020-04-01
 */
@Api(tags = "专业技术职务")
@RestController
@Slf4j
@Validated
public class StdGbProfessionalTechnicalPositionController {

    @Autowired
    private StdGbProfessionalTechnicalPositionService stdGbProfessionalTechnicalPositionService;

    @ApiOperation(value = "获取专业技术职务列表", notes = "获取专业技术职务列表")
    @GetMapping("/listStdGbProfessionalTechnical")
    public AjaxResult listStdGbProfessionalTechnical(@Pattern(regexp = "[0-9]{3,4}", message = "请输入专业技术职务编码")
                                                     @RequestParam(required = false) String parentCode){
        return AjaxResult.success(stdGbProfessionalTechnicalPositionService.listStdGbProfessionalTechnical(parentCode));
    }
}

